home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 76 / XENIATGM66.iso / Indiana Jones / Indiana Jones.exe / RESOURCE / PREVIEW.GOB / cog_tem_waterwhip.cog < prev    next >
Text File  |  1999-11-15  |  2KB  |  89 lines

  1. # Jones 3D Cog Script
  2. #
  3. # TEM_WaterWhip.cog
  4. #
  5. # [TRM]
  6. #
  7. # (C) 1999 LucasArts Entertainment Co. All Rights Reserved
  8. # ========================================================================================
  9.  
  10. symbols
  11.     
  12.     message     damaged
  13.     message     entered
  14.         
  15.     thing       player      local
  16.     thing       strut       #mask=0x8
  17.     thing       whipCam1
  18.     
  19.     surface     thisSide
  20.     surface     thatSide1   linkID=1
  21.     surface     thatSide2   linkID=1
  22.     
  23.     sound       mus_Cue=mus_gen_indywhip1.wav       local
  24.     
  25.     int         side1=1         local
  26.     int         side2=0         local
  27.     int         firstTime=1     local
  28.     
  29. end
  30.  
  31.  
  32. # ========================================================================================
  33.  
  34. code
  35.  
  36. damaged:
  37.  
  38.     player = GetLocalPlayerThing();
  39.     
  40.     if(GetParam(1) == 0x10)
  41.     {
  42.         if(firstTime == 1)
  43.         {
  44.             firstTime = 0;
  45.             Sleep(1.5);
  46.             PlaySoundLocal(mus_Cue, 1.0, 0.0, 0x0, 0);
  47.         }
  48.         
  49.         # disable controls, switch camera
  50.         SetActorFlags(player, 0x200000);
  51.         SetCameraFocus(2, whipCam1);
  52.         SetCameraSecondaryFocus(2, player);
  53.         SetCurrentCamera(2);
  54.         SetCameraFOV(70, 0, 0.0);
  55.     }
  56.                 
  57.     return;
  58.  
  59. # ========================================================================================
  60.  
  61. entered:
  62.     
  63.     # land on gem side
  64.     if((GetSenderID() == 1) && (side2 == 0))
  65.     {
  66.         side2 = 1;
  67.         ClearActorFlags(player, 0x200000);
  68.         SetCameraFOV(90, 0, 0.0);
  69.         SetCurrentCamera(1);
  70.     }
  71.     
  72.     # land on blockade side
  73.     if((GetSenderRef() == thisSide) && (side2 == 1))
  74.     {
  75.         side2 = 0;
  76.         side1 = 1;
  77.         ClearActorFlags(player, 0x200000);
  78.         SetCameraFOV(90, 0, 0.0);
  79.         SetCurrentCamera(1);
  80.     }
  81.         
  82.     return;
  83.                
  84. # ========================================================================================
  85.  
  86.  
  87. end
  88.  
  89.